<?php
if (!defined('DP_BASE_DIR')) {
	echo 'You should not access this file directly.';
	exit();
}

$project_id = dPgetParam($_GET, 'project_id', 0);

$q = new DBQuery();
$q->addTable('project_files', 'f');
$q->addWhere('f.pfile_project = '.$project_id);
$q->addOrder('pfile_name');
$data = $q->loadList();
//showFVar($data);
header('Content-Type: text/xml');

$xml = new XmlWriter();
$xml->openMemory();
$xml->startDocument('1.0', 'UTF-8');

$xml->startElement('root');

obj2xml($xml, 'pfiles', 'item', $data);

$xml->endElement();

echo $xml->outputMemory(true);
?>
